home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-16 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  50.1 KB  |  1,206 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: Flags,  Next: Machine Modes,  Prev: Accessors,  Up: RTL
  36.  
  37. Flags in an RTL Expression
  38. ==========================
  39.  
  40.    RTL expressions contain several flags (one-bit bitfields) and other
  41. values that are used in certain types of expression.  Most often they
  42. are accessed with the following macros:
  43.  
  44. `MEM_VOLATILE_P (X)'
  45.      In `mem' expressions, nonzero for volatile memory references.
  46.      Stored in the `volatil' field and printed as `/v'.
  47.  
  48. `MEM_IN_STRUCT_P (X)'
  49.      In `mem' expressions, nonzero for reference to an entire structure,
  50.      union or array, or to a component of one.  Zero for references to a
  51.      scalar variable or through a pointer to a scalar.  Stored in the
  52.      `in_struct' field and printed as `/s'.  If both this flag and
  53.      MEM_SCALAR_P are clear, then we don't know whether this MEM is in a
  54.      structure or not.  Both flags should never be simultaneously set.
  55.  
  56. `MEM_SCALAR_P (X)'
  57.      In `mem' expressions, nonzero for reference to a scalar known not
  58.      to be a member of a structure, union, or array.  Zero for such
  59.      references and for indirections through pointers, even pointers
  60.      pointing to scalar types.  If both this flag and MEM_STRUCT_P are
  61.      clear, then we don't know whether this MEM is in a structure or
  62.      not.  Both flags should never be simultaneously set.
  63.  
  64. `MEM_ALIAS_SET (X)'
  65.      In `mem' expressions, the alias set to which X belongs.  If zero,
  66.      X is not in any alias set, and may alias anything.  If nonzero, X
  67.      may only alias objects in the same alias set.  This value is set
  68.      (in a language-specific manner) by the front-end.  This field is
  69.      not a bit-field; it is in an integer, found as the second argument
  70.      to the `mem'.
  71.  
  72. `REG_LOOP_TEST_P'
  73.      In `reg' expressions, nonzero if this register's entire life is
  74.      contained in the exit test code for some loop.  Stored in the
  75.      `in_struct' field and printed as `/s'.
  76.  
  77. `REG_USERVAR_P (X)'
  78.      In a `reg', nonzero if it corresponds to a variable present in the
  79.      user's source code.  Zero for temporaries generated internally by
  80.      the compiler.  Stored in the `volatil' field and printed as `/v'.
  81.  
  82. `REG_FUNCTION_VALUE_P (X)'
  83.      Nonzero in a `reg' if it is the place in which this function's
  84.      value is going to be returned.  (This happens only in a hard
  85.      register.)  Stored in the `integrated' field and printed as `/i'.
  86.  
  87.      The same hard register may be used also for collecting the values
  88.      of functions called by this one, but `REG_FUNCTION_VALUE_P' is zero
  89.      in this kind of use.
  90.  
  91. `SUBREG_PROMOTED_VAR_P'
  92.      Nonzero in a `subreg' if it was made when accessing an object that
  93.      was promoted to a wider mode in accord with the `PROMOTED_MODE'
  94.      machine description macro (*note Storage Layout::.).  In this
  95.      case, the mode of the `subreg' is the declared mode of the object
  96.      and the mode of `SUBREG_REG' is the mode of the register that
  97.      holds the object.  Promoted variables are always either sign- or
  98.      zero-extended to the wider mode on every assignment.  Stored in
  99.      the `in_struct' field and printed as `/s'.
  100.  
  101. `SUBREG_PROMOTED_UNSIGNED_P'
  102.      Nonzero in a `subreg' that has `SUBREG_PROMOTED_VAR_P' nonzero if
  103.      the object being referenced is kept zero-extended and zero if it
  104.      is kept sign-extended.  Stored in the `unchanging' field and
  105.      printed as `/u'.
  106.  
  107. `RTX_UNCHANGING_P (X)'
  108.      Nonzero in a `reg' or `mem' if the value is not changed.  (This
  109.      flag is not set for memory references via pointers to constants.
  110.      Such pointers only guarantee that the object will not be changed
  111.      explicitly by the current function.  The object might be changed by
  112.      other functions or by aliasing.)  Stored in the `unchanging' field
  113.      and printed as `/u'.
  114.  
  115. `RTX_INTEGRATED_P (INSN)'
  116.      Nonzero in an insn if it resulted from an in-line function call.
  117.      Stored in the `integrated' field and printed as `/i'.
  118.  
  119. `RTX_FRAME_RELATED_P (X)'
  120.      Nonzero in an insn or expression which is part of a function
  121.      prologue and sets the stack pointer, sets the frame pointer, or
  122.      saves a register. This flag is required for exception handling
  123.      support on targets with RTL prologues.
  124.  
  125. `SYMBOL_REF_USED (X)'
  126.      In a `symbol_ref', indicates that X has been used.  This is
  127.      normally only used to ensure that X is only declared external
  128.      once.  Stored in the `used' field.
  129.  
  130. `SYMBOL_REF_FLAG (X)'
  131.      In a `symbol_ref', this is used as a flag for machine-specific
  132.      purposes.  Stored in the `volatil' field and printed as `/v'.
  133.  
  134. `LABEL_OUTSIDE_LOOP_P'
  135.      In `label_ref' expressions, nonzero if this is a reference to a
  136.      label that is outside the innermost loop containing the reference
  137.      to the label.  Stored in the `in_struct' field and printed as `/s'.
  138.  
  139. `INSN_DELETED_P (INSN)'
  140.      In an insn, nonzero if the insn has been deleted.  Stored in the
  141.      `volatil' field and printed as `/v'.
  142.  
  143. `INSN_ANNULLED_BRANCH_P (INSN)'
  144.      In an `insn' in the delay slot of a branch insn, indicates that an
  145.      annulling branch should be used.  See the discussion under
  146.      `sequence' below.  Stored in the `unchanging' field and printed as
  147.      `/u'.
  148.  
  149. `INSN_FROM_TARGET_P (INSN)'
  150.      In an `insn' in a delay slot of a branch, indicates that the insn
  151.      is from the target of the branch.  If the branch insn has
  152.      `INSN_ANNULLED_BRANCH_P' set, this insn will only be executed if
  153.      the branch is taken.  For annulled branches with
  154.      `INSN_FROM_TARGET_P' clear, the insn will be executed only if the
  155.      branch is not taken.  When `INSN_ANNULLED_BRANCH_P' is not set,
  156.      this insn will always be executed.  Stored in the `in_struct'
  157.      field and printed as `/s'.
  158.  
  159. `CONSTANT_POOL_ADDRESS_P (X)'
  160.      Nonzero in a `symbol_ref' if it refers to part of the current
  161.      function's "constants pool".  These are addresses close to the
  162.      beginning of the function, and GNU CC assumes they can be addressed
  163.      directly (perhaps with the help of base registers).  Stored in the
  164.      `unchanging' field and printed as `/u'.
  165.  
  166. `CONST_CALL_P (X)'
  167.      In a `call_insn', indicates that the insn represents a call to a
  168.      const function.  Stored in the `unchanging' field and printed as
  169.      `/u'.
  170.  
  171. `LABEL_PRESERVE_P (X)'
  172.      In a `code_label', indicates that the label can never be deleted.
  173.      Labels referenced by a non-local goto will have this bit set.
  174.      Stored in the `in_struct' field and printed as `/s'.
  175.  
  176. `SCHED_GROUP_P (INSN)'
  177.      During instruction scheduling, in an insn, indicates that the
  178.      previous insn must be scheduled together with this insn.  This is
  179.      used to ensure that certain groups of instructions will not be
  180.      split up by the instruction scheduling pass, for example, `use'
  181.      insns before a `call_insn' may not be separated from the
  182.      `call_insn'.  Stored in the `in_struct' field and printed as `/s'.
  183.  
  184.    These are the fields which the above macros refer to:
  185.  
  186. `used'
  187.      Normally, this flag is used only momentarily, at the end of RTL
  188.      generation for a function, to count the number of times an
  189.      expression appears in insns.  Expressions that appear more than
  190.      once are copied, according to the rules for shared structure
  191.      (*note Sharing::.).
  192.  
  193.      In a `symbol_ref', it indicates that an external declaration for
  194.      the symbol has already been written.
  195.  
  196.      In a `reg', it is used by the leaf register renumbering code to
  197.      ensure that each register is only renumbered once.
  198.  
  199. `volatil'
  200.      This flag is used in `mem', `symbol_ref' and `reg' expressions and
  201.      in insns.  In RTL dump files, it is printed as `/v'.
  202.  
  203.      In a `mem' expression, it is 1 if the memory reference is volatile.
  204.      Volatile memory references may not be deleted, reordered or
  205.      combined.
  206.  
  207.      In a `symbol_ref' expression, it is used for machine-specific
  208.      purposes.
  209.  
  210.      In a `reg' expression, it is 1 if the value is a user-level
  211.      variable.  0 indicates an internal compiler temporary.
  212.  
  213.      In an insn, 1 means the insn has been deleted.
  214.  
  215. `in_struct'
  216.      In `mem' expressions, it is 1 if the memory datum referred to is
  217.      all or part of a structure or array; 0 if it is (or might be) a
  218.      scalar variable.  A reference through a C pointer has 0 because
  219.      the pointer might point to a scalar variable.  This information
  220.      allows the compiler to determine something about possible cases of
  221.      aliasing.
  222.  
  223.      In an insn in the delay slot of a branch, 1 means that this insn
  224.      is from the target of the branch.
  225.  
  226.      During instruction scheduling, in an insn, 1 means that this insn
  227.      must be scheduled as part of a group together with the previous
  228.      insn.
  229.  
  230.      In `reg' expressions, it is 1 if the register has its entire life
  231.      contained within the test expression of some loop.
  232.  
  233.      In `subreg' expressions, 1 means that the `subreg' is accessing an
  234.      object that has had its mode promoted from a wider mode.
  235.  
  236.      In `label_ref' expressions, 1 means that the referenced label is
  237.      outside the innermost loop containing the insn in which the
  238.      `label_ref' was found.
  239.  
  240.      In `code_label' expressions, it is 1 if the label may never be
  241.      deleted.  This is used for labels which are the target of
  242.      non-local gotos.
  243.  
  244.      In an RTL dump, this flag is represented as `/s'.
  245.  
  246. `unchanging'
  247.      In `reg' and `mem' expressions, 1 means that the value of the
  248.      expression never changes.
  249.  
  250.      In `subreg' expressions, it is 1 if the `subreg' references an
  251.      unsigned object whose mode has been promoted to a wider mode.
  252.  
  253.      In an insn, 1 means that this is an annulling branch.
  254.  
  255.      In a `symbol_ref' expression, 1 means that this symbol addresses
  256.      something in the per-function constants pool.
  257.  
  258.      In a `call_insn', 1 means that this instruction is a call to a
  259.      const function.
  260.  
  261.      In an RTL dump, this flag is represented as `/u'.
  262.  
  263. `integrated'
  264.      In some kinds of expressions, including insns, this flag means the
  265.      rtl was produced by procedure integration.
  266.  
  267.      In a `reg' expression, this flag indicates the register containing
  268.      the value to be returned by the current function.  On machines
  269.      that pass parameters in registers, the same register number may be
  270.      used for parameters as well, but this flag is not set on such uses.
  271.  
  272. 
  273. File: gcc.info,  Node: Machine Modes,  Next: Constants,  Prev: Flags,  Up: RTL
  274.  
  275. Machine Modes
  276. =============
  277.  
  278.    A machine mode describes a size of data object and the
  279. representation used for it.  In the C code, machine modes are
  280. represented by an enumeration type, `enum machine_mode', defined in
  281. `machmode.def'.  Each RTL expression has room for a machine mode and so
  282. do certain kinds of tree expressions (declarations and types, to be
  283. precise).
  284.  
  285.    In debugging dumps and machine descriptions, the machine mode of an
  286. RTL expression is written after the expression code with a colon to
  287. separate them.  The letters `mode' which appear at the end of each
  288. machine mode name are omitted.  For example, `(reg:SI 38)' is a `reg'
  289. expression with machine mode `SImode'.  If the mode is `VOIDmode', it
  290. is not written at all.
  291.  
  292.    Here is a table of machine modes.  The term "byte" below refers to an
  293. object of `BITS_PER_UNIT' bits (*note Storage Layout::.).
  294.  
  295. `QImode'
  296.      "Quarter-Integer" mode represents a single byte treated as an
  297.      integer.
  298.  
  299. `HImode'
  300.      "Half-Integer" mode represents a two-byte integer.
  301.  
  302. `PSImode'
  303.      "Partial Single Integer" mode represents an integer which occupies
  304.      four bytes but which doesn't really use all four.  On some
  305.      machines, this is the right mode to use for pointers.
  306.  
  307. `SImode'
  308.      "Single Integer" mode represents a four-byte integer.
  309.  
  310. `PDImode'
  311.      "Partial Double Integer" mode represents an integer which occupies
  312.      eight bytes but which doesn't really use all eight.  On some
  313.      machines, this is the right mode to use for certain pointers.
  314.  
  315. `DImode'
  316.      "Double Integer" mode represents an eight-byte integer.
  317.  
  318. `TImode'
  319.      "Tetra Integer" (?) mode represents a sixteen-byte integer.
  320.  
  321. `SFmode'
  322.      "Single Floating" mode represents a single-precision (four byte)
  323.      floating point number.
  324.  
  325. `DFmode'
  326.      "Double Floating" mode represents a double-precision (eight byte)
  327.      floating point number.
  328.  
  329. `XFmode'
  330.      "Extended Floating" mode represents a triple-precision (twelve
  331.      byte) floating point number.  This mode is used for IEEE extended
  332.      floating point.  On some systems not all bits within these bytes
  333.      will actually be used.
  334.  
  335. `TFmode'
  336.      "Tetra Floating" mode represents a quadruple-precision (sixteen
  337.      byte) floating point number.
  338.  
  339. `CCmode'
  340.      "Condition Code" mode represents the value of a condition code,
  341.      which is a machine-specific set of bits used to represent the
  342.      result of a comparison operation.  Other machine-specific modes
  343.      may also be used for the condition code.  These modes are not used
  344.      on machines that use `cc0' (see *note Condition Code::.).
  345.  
  346. `BLKmode'
  347.      "Block" mode represents values that are aggregates to which none of
  348.      the other modes apply.  In RTL, only memory references can have
  349.      this mode, and only if they appear in string-move or vector
  350.      instructions.  On machines which have no such instructions,
  351.      `BLKmode' will not appear in RTL.
  352.  
  353. `VOIDmode'
  354.      Void mode means the absence of a mode or an unspecified mode.  For
  355.      example, RTL expressions of code `const_int' have mode `VOIDmode'
  356.      because they can be taken to have whatever mode the context
  357.      requires.  In debugging dumps of RTL, `VOIDmode' is expressed by
  358.      the absence of any mode.
  359.  
  360. `SCmode, DCmode, XCmode, TCmode'
  361.      These modes stand for a complex number represented as a pair of
  362.      floating point values.  The floating point values are in `SFmode',
  363.      `DFmode', `XFmode', and `TFmode', respectively.
  364.  
  365. `CQImode, CHImode, CSImode, CDImode, CTImode, COImode'
  366.      These modes stand for a complex number represented as a pair of
  367.      integer values.  The integer values are in `QImode', `HImode',
  368.      `SImode', `DImode', `TImode', and `OImode', respectively.
  369.  
  370.    The machine description defines `Pmode' as a C macro which expands
  371. into the machine mode used for addresses.  Normally this is the mode
  372. whose size is `BITS_PER_WORD', `SImode' on 32-bit machines.
  373.  
  374.    The only modes which a machine description must support are
  375. `QImode', and the modes corresponding to `BITS_PER_WORD',
  376. `FLOAT_TYPE_SIZE' and `DOUBLE_TYPE_SIZE'.  The compiler will attempt to
  377. use `DImode' for 8-byte structures and unions, but this can be
  378. prevented by overriding the definition of `MAX_FIXED_MODE_SIZE'.
  379. Alternatively, you can have the compiler use `TImode' for 16-byte
  380. structures and unions.  Likewise, you can arrange for the C type `short
  381. int' to avoid using `HImode'.
  382.  
  383.    Very few explicit references to machine modes remain in the compiler
  384. and these few references will soon be removed.  Instead, the machine
  385. modes are divided into mode classes.  These are represented by the
  386. enumeration type `enum mode_class' defined in `machmode.h'.  The
  387. possible mode classes are:
  388.  
  389. `MODE_INT'
  390.      Integer modes.  By default these are `QImode', `HImode', `SImode',
  391.      `DImode', and `TImode'.
  392.  
  393. `MODE_PARTIAL_INT'
  394.      The "partial integer" modes, `PSImode' and `PDImode'.
  395.  
  396. `MODE_FLOAT'
  397.      floating point modes.  By default these are `SFmode', `DFmode',
  398.      `XFmode' and `TFmode'.
  399.  
  400. `MODE_COMPLEX_INT'
  401.      Complex integer modes.  (These are not currently implemented).
  402.  
  403. `MODE_COMPLEX_FLOAT'
  404.      Complex floating point modes.  By default these are `SCmode',
  405.      `DCmode', `XCmode', and `TCmode'.
  406.  
  407. `MODE_FUNCTION'
  408.      Algol or Pascal function variables including a static chain.
  409.      (These are not currently implemented).
  410.  
  411. `MODE_CC'
  412.      Modes representing condition code values.  These are `CCmode' plus
  413.      any modes listed in the `EXTRA_CC_MODES' macro.  *Note Jump
  414.      Patterns::, also see *Note Condition Code::..
  415.  
  416. `MODE_RANDOM'
  417.      This is a catchall mode class for modes which don't fit into the
  418.      above classes.  Currently `VOIDmode' and `BLKmode' are in
  419.      `MODE_RANDOM'.
  420.  
  421.    Here are some C macros that relate to machine modes:
  422.  
  423. `GET_MODE (X)'
  424.      Returns the machine mode of the RTX X.
  425.  
  426. `PUT_MODE (X, NEWMODE)'
  427.      Alters the machine mode of the RTX X to be NEWMODE.
  428.  
  429. `NUM_MACHINE_MODES'
  430.      Stands for the number of machine modes available on the target
  431.      machine.  This is one greater than the largest numeric value of any
  432.      machine mode.
  433.  
  434. `GET_MODE_NAME (M)'
  435.      Returns the name of mode M as a string.
  436.  
  437. `GET_MODE_CLASS (M)'
  438.      Returns the mode class of mode M.
  439.  
  440. `GET_MODE_WIDER_MODE (M)'
  441.      Returns the next wider natural mode.  For example, the expression
  442.      `GET_MODE_WIDER_MODE (QImode)' returns `HImode'.
  443.  
  444. `GET_MODE_SIZE (M)'
  445.      Returns the size in bytes of a datum of mode M.
  446.  
  447. `GET_MODE_BITSIZE (M)'
  448.      Returns the size in bits of a datum of mode M.
  449.  
  450. `GET_MODE_MASK (M)'
  451.      Returns a bitmask containing 1 for all bits in a word that fit
  452.      within mode M.  This macro can only be used for modes whose
  453.      bitsize is less than or equal to `HOST_BITS_PER_INT'.
  454.  
  455. `GET_MODE_ALIGNMENT (M))'
  456.      Return the required alignment, in bits, for an object of mode M.
  457.  
  458. `GET_MODE_UNIT_SIZE (M)'
  459.      Returns the size in bytes of the subunits of a datum of mode M.
  460.      This is the same as `GET_MODE_SIZE' except in the case of complex
  461.      modes.  For them, the unit size is the size of the real or
  462.      imaginary part.
  463.  
  464. `GET_MODE_NUNITS (M)'
  465.      Returns the number of units contained in a mode, i.e.,
  466.      `GET_MODE_SIZE' divided by `GET_MODE_UNIT_SIZE'.
  467.  
  468. `GET_CLASS_NARROWEST_MODE (C)'
  469.      Returns the narrowest mode in mode class C.
  470.  
  471.    The global variables `byte_mode' and `word_mode' contain modes whose
  472. classes are `MODE_INT' and whose bitsizes are either `BITS_PER_UNIT' or
  473. `BITS_PER_WORD', respectively.  On 32-bit machines, these are `QImode'
  474. and `SImode', respectively.
  475.  
  476. 
  477. File: gcc.info,  Node: Constants,  Next: Regs and Memory,  Prev: Machine Modes,  Up: RTL
  478.  
  479. Constant Expression Types
  480. =========================
  481.  
  482.    The simplest RTL expressions are those that represent constant
  483. values.
  484.  
  485. `(const_int I)'
  486.      This type of expression represents the integer value I.  I is
  487.      customarily accessed with the macro `INTVAL' as in `INTVAL (EXP)',
  488.      which is equivalent to `XWINT (EXP, 0)'.
  489.  
  490.      There is only one expression object for the integer value zero; it
  491.      is the value of the variable `const0_rtx'.  Likewise, the only
  492.      expression for integer value one is found in `const1_rtx', the only
  493.      expression for integer value two is found in `const2_rtx', and the
  494.      only expression for integer value negative one is found in
  495.      `constm1_rtx'.  Any attempt to create an expression of code
  496.      `const_int' and value zero, one, two or negative one will return
  497.      `const0_rtx', `const1_rtx', `const2_rtx' or `constm1_rtx' as
  498.      appropriate.
  499.  
  500.      Similarly, there is only one object for the integer whose value is
  501.      `STORE_FLAG_VALUE'.  It is found in `const_true_rtx'.  If
  502.      `STORE_FLAG_VALUE' is one, `const_true_rtx' and `const1_rtx' will
  503.      point to the same object.  If `STORE_FLAG_VALUE' is -1,
  504.      `const_true_rtx' and `constm1_rtx' will point to the same object.
  505.  
  506. `(const_double:M ADDR I0 I1 ...)'
  507.      Represents either a floating-point constant of mode M or an
  508.      integer constant too large to fit into `HOST_BITS_PER_WIDE_INT'
  509.      bits but small enough to fit within twice that number of bits (GNU
  510.      CC does not provide a mechanism to represent even larger
  511.      constants).  In the latter case, M will be `VOIDmode'.
  512.  
  513.      ADDR is used to contain the `mem' expression that corresponds to
  514.      the location in memory that at which the constant can be found.  If
  515.      it has not been allocated a memory location, but is on the chain
  516.      of all `const_double' expressions in this compilation (maintained
  517.      using an undisplayed field), ADDR contains `const0_rtx'.  If it is
  518.      not on the chain, ADDR contains `cc0_rtx'.  ADDR is customarily
  519.      accessed with the macro `CONST_DOUBLE_MEM' and the chain field via
  520.      `CONST_DOUBLE_CHAIN'.
  521.  
  522.      If M is `VOIDmode', the bits of the value are stored in I0 and I1.
  523.      I0 is customarily accessed with the macro `CONST_DOUBLE_LOW' and
  524.      I1 with `CONST_DOUBLE_HIGH'.
  525.  
  526.      If the constant is floating point (regardless of its precision),
  527.      then the number of integers used to store the value depends on the
  528.      size of `REAL_VALUE_TYPE' (*note Cross-compilation::.).  The
  529.      integers represent a floating point number, but not precisely in
  530.      the target machine's or host machine's floating point format.  To
  531.      convert them to the precise bit pattern used by the target
  532.      machine, use the macro `REAL_VALUE_TO_TARGET_DOUBLE' and friends
  533.      (*note Data Output::.).
  534.  
  535.      The macro `CONST0_RTX (MODE)' refers to an expression with value 0
  536.      in mode MODE.  If mode MODE is of mode class `MODE_INT', it
  537.      returns `const0_rtx'.  Otherwise, it returns a `CONST_DOUBLE'
  538.      expression in mode MODE.  Similarly, the macro `CONST1_RTX (MODE)'
  539.      refers to an expression with value 1 in mode MODE and similarly
  540.      for `CONST2_RTX'.
  541.  
  542. `(const_string STR)'
  543.      Represents a constant string with value STR.  Currently this is
  544.      used only for insn attributes (*note Insn Attributes::.) since
  545.      constant strings in C are placed in memory.
  546.  
  547. `(symbol_ref:MODE SYMBOL)'
  548.      Represents the value of an assembler label for data.  SYMBOL is a
  549.      string that describes the name of the assembler label.  If it
  550.      starts with a `*', the label is the rest of SYMBOL not including
  551.      the `*'.  Otherwise, the label is SYMBOL, usually prefixed with
  552.      `_'.
  553.  
  554.      The `symbol_ref' contains a mode, which is usually `Pmode'.
  555.      Usually that is the only mode for which a symbol is directly valid.
  556.  
  557. `(label_ref LABEL)'
  558.      Represents the value of an assembler label for code.  It contains
  559.      one operand, an expression, which must be a `code_label' that
  560.      appears in the instruction sequence to identify the place where
  561.      the label should go.
  562.  
  563.      The reason for using a distinct expression type for code label
  564.      references is so that jump optimization can distinguish them.
  565.  
  566. `(const:M EXP)'
  567.      Represents a constant that is the result of an assembly-time
  568.      arithmetic computation.  The operand, EXP, is an expression that
  569.      contains only constants (`const_int', `symbol_ref' and `label_ref'
  570.      expressions) combined with `plus' and `minus'.  However, not all
  571.      combinations are valid, since the assembler cannot do arbitrary
  572.      arithmetic on relocatable symbols.
  573.  
  574.      M should be `Pmode'.
  575.  
  576. `(high:M EXP)'
  577.      Represents the high-order bits of EXP, usually a `symbol_ref'.
  578.      The number of bits is machine-dependent and is normally the number
  579.      of bits specified in an instruction that initializes the high
  580.      order bits of a register.  It is used with `lo_sum' to represent
  581.      the typical two-instruction sequence used in RISC machines to
  582.      reference a global memory location.
  583.  
  584.      M should be `Pmode'.
  585.  
  586. 
  587. File: gcc.info,  Node: Regs and Memory,  Next: Arithmetic,  Prev: Constants,  Up: RTL
  588.  
  589. Registers and Memory
  590. ====================
  591.  
  592.    Here are the RTL expression types for describing access to machine
  593. registers and to main memory.
  594.  
  595. `(reg:M N)'
  596.      For small values of the integer N (those that are less than
  597.      `FIRST_PSEUDO_REGISTER'), this stands for a reference to machine
  598.      register number N: a "hard register".  For larger values of N, it
  599.      stands for a temporary value or "pseudo register".  The compiler's
  600.      strategy is to generate code assuming an unlimited number of such
  601.      pseudo registers, and later convert them into hard registers or
  602.      into memory references.
  603.  
  604.      M is the machine mode of the reference.  It is necessary because
  605.      machines can generally refer to each register in more than one
  606.      mode.  For example, a register may contain a full word but there
  607.      may be instructions to refer to it as a half word or as a single
  608.      byte, as well as instructions to refer to it as a floating point
  609.      number of various precisions.
  610.  
  611.      Even for a register that the machine can access in only one mode,
  612.      the mode must always be specified.
  613.  
  614.      The symbol `FIRST_PSEUDO_REGISTER' is defined by the machine
  615.      description, since the number of hard registers on the machine is
  616.      an invariant characteristic of the machine.  Note, however, that
  617.      not all of the machine registers must be general registers.  All
  618.      the machine registers that can be used for storage of data are
  619.      given hard register numbers, even those that can be used only in
  620.      certain instructions or can hold only certain types of data.
  621.  
  622.      A hard register may be accessed in various modes throughout one
  623.      function, but each pseudo register is given a natural mode and is
  624.      accessed only in that mode.  When it is necessary to describe an
  625.      access to a pseudo register using a nonnatural mode, a `subreg'
  626.      expression is used.
  627.  
  628.      A `reg' expression with a machine mode that specifies more than
  629.      one word of data may actually stand for several consecutive
  630.      registers.  If in addition the register number specifies a
  631.      hardware register, then it actually represents several consecutive
  632.      hardware registers starting with the specified one.
  633.  
  634.      Each pseudo register number used in a function's RTL code is
  635.      represented by a unique `reg' expression.
  636.  
  637.      Some pseudo register numbers, those within the range of
  638.      `FIRST_VIRTUAL_REGISTER' to `LAST_VIRTUAL_REGISTER' only appear
  639.      during the RTL generation phase and are eliminated before the
  640.      optimization phases.  These represent locations in the stack frame
  641.      that cannot be determined until RTL generation for the function
  642.      has been completed.  The following virtual register numbers are
  643.      defined:
  644.  
  645.     `VIRTUAL_INCOMING_ARGS_REGNUM'
  646.           This points to the first word of the incoming arguments
  647.           passed on the stack.  Normally these arguments are placed
  648.           there by the caller, but the callee may have pushed some
  649.           arguments that were previously passed in registers.
  650.  
  651.           When RTL generation is complete, this virtual register is
  652.           replaced by the sum of the register given by
  653.           `ARG_POINTER_REGNUM' and the value of `FIRST_PARM_OFFSET'.
  654.  
  655.     `VIRTUAL_STACK_VARS_REGNUM'
  656.           If `FRAME_GROWS_DOWNWARD' is defined, this points to
  657.           immediately above the first variable on the stack.
  658.           Otherwise, it points to the first variable on the stack.
  659.  
  660.           `VIRTUAL_STACK_VARS_REGNUM' is replaced with the sum of the
  661.           register given by `FRAME_POINTER_REGNUM' and the value
  662.           `STARTING_FRAME_OFFSET'.
  663.  
  664.     `VIRTUAL_STACK_DYNAMIC_REGNUM'
  665.           This points to the location of dynamically allocated memory
  666.           on the stack immediately after the stack pointer has been
  667.           adjusted by the amount of memory desired.
  668.  
  669.           This virtual register is replaced by the sum of the register
  670.           given by `STACK_POINTER_REGNUM' and the value
  671.           `STACK_DYNAMIC_OFFSET'.
  672.  
  673.     `VIRTUAL_OUTGOING_ARGS_REGNUM'
  674.           This points to the location in the stack at which outgoing
  675.           arguments should be written when the stack is pre-pushed
  676.           (arguments pushed using push insns should always use
  677.           `STACK_POINTER_REGNUM').
  678.  
  679.           This virtual register is replaced by the sum of the register
  680.           given by `STACK_POINTER_REGNUM' and the value
  681.           `STACK_POINTER_OFFSET'.
  682.  
  683. `(subreg:M REG WORDNUM)'
  684.      `subreg' expressions are used to refer to a register in a machine
  685.      mode other than its natural one, or to refer to one register of a
  686.      multi-word `reg' that actually refers to several registers.
  687.  
  688.      Each pseudo-register has a natural mode.  If it is necessary to
  689.      operate on it in a different mode--for example, to perform a
  690.      fullword move instruction on a pseudo-register that contains a
  691.      single byte--the pseudo-register must be enclosed in a `subreg'.
  692.      In such a case, WORDNUM is zero.
  693.  
  694.      Usually M is at least as narrow as the mode of REG, in which case
  695.      it is restricting consideration to only the bits of REG that are
  696.      in M.
  697.  
  698.      Sometimes M is wider than the mode of REG.  These `subreg'
  699.      expressions are often called "paradoxical".  They are used in
  700.      cases where we want to refer to an object in a wider mode but do
  701.      not care what value the additional bits have.  The reload pass
  702.      ensures that paradoxical references are only made to hard
  703.      registers.
  704.  
  705.      The other use of `subreg' is to extract the individual registers of
  706.      a multi-register value.  Machine modes such as `DImode' and
  707.      `TImode' can indicate values longer than a word, values which
  708.      usually require two or more consecutive registers.  To access one
  709.      of the registers, use a `subreg' with mode `SImode' and a WORDNUM
  710.      that says which register.
  711.  
  712.      Storing in a non-paradoxical `subreg' has undefined results for
  713.      bits belonging to the same word as the `subreg'.  This laxity makes
  714.      it easier to generate efficient code for such instructions.  To
  715.      represent an instruction that preserves all the bits outside of
  716.      those in the `subreg', use `strict_low_part' around the `subreg'.
  717.  
  718.      The compilation parameter `WORDS_BIG_ENDIAN', if set to 1, says
  719.      that word number zero is the most significant part; otherwise, it
  720.      is the least significant part.
  721.  
  722.      On a few targets, `FLOAT_WORDS_BIG_ENDIAN' disagrees with
  723.      `WORDS_BIG_ENDIAN'.  However, most parts of the compiler treat
  724.      floating point values as if they had the same endianness as
  725.      integer values.  This works because they handle them solely as a
  726.      collection of integer values, with no particular numerical value.
  727.      Only real.c and the runtime libraries care about
  728.      `FLOAT_WORDS_BIG_ENDIAN'.
  729.  
  730.      Between the combiner pass and the reload pass, it is possible to
  731.      have a paradoxical `subreg' which contains a `mem' instead of a
  732.      `reg' as its first operand.  After the reload pass, it is also
  733.      possible to have a non-paradoxical `subreg' which contains a
  734.      `mem'; this usually occurs when the `mem' is a stack slot which
  735.      replaced a pseudo register.
  736.  
  737.      Note that it is not valid to access a `DFmode' value in `SFmode'
  738.      using a `subreg'.  On some machines the most significant part of a
  739.      `DFmode' value does not have the same format as a single-precision
  740.      floating value.
  741.  
  742.      It is also not valid to access a single word of a multi-word value
  743.      in a hard register when less registers can hold the value than
  744.      would be expected from its size.  For example, some 32-bit
  745.      machines have floating-point registers that can hold an entire
  746.      `DFmode' value.  If register 10 were such a register `(subreg:SI
  747.      (reg:DF 10) 1)' would be invalid because there is no way to
  748.      convert that reference to a single machine register.  The reload
  749.      pass prevents `subreg' expressions such as these from being formed.
  750.  
  751.      The first operand of a `subreg' expression is customarily accessed
  752.      with the `SUBREG_REG' macro and the second operand is customarily
  753.      accessed with the `SUBREG_WORD' macro.
  754.  
  755. `(scratch:M)'
  756.      This represents a scratch register that will be required for the
  757.      execution of a single instruction and not used subsequently.  It is
  758.      converted into a `reg' by either the local register allocator or
  759.      the reload pass.
  760.  
  761.      `scratch' is usually present inside a `clobber' operation (*note
  762.      Side Effects::.).
  763.  
  764. `(cc0)'
  765.      This refers to the machine's condition code register.  It has no
  766.      operands and may not have a machine mode.  There are two ways to
  767.      use it:
  768.  
  769.         * To stand for a complete set of condition code flags.  This is
  770.           best on most machines, where each comparison sets the entire
  771.           series of flags.
  772.  
  773.           With this technique, `(cc0)' may be validly used in only two
  774.           contexts: as the destination of an assignment (in test and
  775.           compare instructions) and in comparison operators comparing
  776.           against zero (`const_int' with value zero; that is to say,
  777.           `const0_rtx').
  778.  
  779.         * To stand for a single flag that is the result of a single
  780.           condition.  This is useful on machines that have only a
  781.           single flag bit, and in which comparison instructions must
  782.           specify the condition to test.
  783.  
  784.           With this technique, `(cc0)' may be validly used in only two
  785.           contexts: as the destination of an assignment (in test and
  786.           compare instructions) where the source is a comparison
  787.           operator, and as the first operand of `if_then_else' (in a
  788.           conditional branch).
  789.  
  790.      There is only one expression object of code `cc0'; it is the value
  791.      of the variable `cc0_rtx'.  Any attempt to create an expression of
  792.      code `cc0' will return `cc0_rtx'.
  793.  
  794.      Instructions can set the condition code implicitly.  On many
  795.      machines, nearly all instructions set the condition code based on
  796.      the value that they compute or store.  It is not necessary to
  797.      record these actions explicitly in the RTL because the machine
  798.      description includes a prescription for recognizing the
  799.      instructions that do so (by means of the macro
  800.      `NOTICE_UPDATE_CC').  *Note Condition Code::.  Only instructions
  801.      whose sole purpose is to set the condition code, and instructions
  802.      that use the condition code, need mention `(cc0)'.
  803.  
  804.      On some machines, the condition code register is given a register
  805.      number and a `reg' is used instead of `(cc0)'.  This is usually the
  806.      preferable approach if only a small subset of instructions modify
  807.      the condition code.  Other machines store condition codes in
  808.      general registers; in such cases a pseudo register should be used.
  809.  
  810.      Some machines, such as the Sparc and RS/6000, have two sets of
  811.      arithmetic instructions, one that sets and one that does not set
  812.      the condition code.  This is best handled by normally generating
  813.      the instruction that does not set the condition code, and making a
  814.      pattern that both performs the arithmetic and sets the condition
  815.      code register (which would not be `(cc0)' in this case).  For
  816.      examples, search for `addcc' and `andcc' in `sparc.md'.
  817.  
  818. `(pc)'
  819.      This represents the machine's program counter.  It has no operands
  820.      and may not have a machine mode.  `(pc)' may be validly used only
  821.      in certain specific contexts in jump instructions.
  822.  
  823.      There is only one expression object of code `pc'; it is the value
  824.      of the variable `pc_rtx'.  Any attempt to create an expression of
  825.      code `pc' will return `pc_rtx'.
  826.  
  827.      All instructions that do not jump alter the program counter
  828.      implicitly by incrementing it, but there is no need to mention
  829.      this in the RTL.
  830.  
  831. `(mem:M ADDR)'
  832.      This RTX represents a reference to main memory at an address
  833.      represented by the expression ADDR.  M specifies how large a unit
  834.      of memory is accessed.
  835.  
  836. `(addressof:M REG)'
  837.      This RTX represents a request for the address of register REG.
  838.      Its mode is always `Pmode'.  If there are any `addressof'
  839.      expressions left in the function after CSE, REG is forced into the
  840.      stack and the `addressof' expression is replaced with a `plus'
  841.      expression for the address of its stack slot.
  842.  
  843. 
  844. File: gcc.info,  Node: Arithmetic,  Next: Comparisons,  Prev: Regs and Memory,  Up: RTL
  845.  
  846. RTL Expressions for Arithmetic
  847. ==============================
  848.  
  849.    Unless otherwise specified, all the operands of arithmetic
  850. expressions must be valid for mode M.  An operand is valid for mode M
  851. if it has mode M, or if it is a `const_int' or `const_double' and M is
  852. a mode of class `MODE_INT'.
  853.  
  854.    For commutative binary operations, constants should be placed in the
  855. second operand.
  856.  
  857. `(plus:M X Y)'
  858.      Represents the sum of the values represented by X and Y carried
  859.      out in machine mode M.
  860.  
  861. `(lo_sum:M X Y)'
  862.      Like `plus', except that it represents that sum of X and the
  863.      low-order bits of Y.  The number of low order bits is
  864.      machine-dependent but is normally the number of bits in a `Pmode'
  865.      item minus the number of bits set by the `high' code (*note
  866.      Constants::.).
  867.  
  868.      M should be `Pmode'.
  869.  
  870. `(minus:M X Y)'
  871.      Like `plus' but represents subtraction.
  872.  
  873. `(compare:M X Y)'
  874.      Represents the result of subtracting Y from X for purposes of
  875.      comparison.  The result is computed without overflow, as if with
  876.      infinite precision.
  877.  
  878.      Of course, machines can't really subtract with infinite precision.
  879.      However, they can pretend to do so when only the sign of the
  880.      result will be used, which is the case when the result is stored
  881.      in the condition code.   And that is the only way this kind of
  882.      expression may validly be used: as a value to be stored in the
  883.      condition codes.
  884.  
  885.      The mode M is not related to the modes of X and Y, but instead is
  886.      the mode of the condition code value.  If `(cc0)' is used, it is
  887.      `VOIDmode'.  Otherwise it is some mode in class `MODE_CC', often
  888.      `CCmode'.  *Note Condition Code::.
  889.  
  890.      Normally, X and Y must have the same mode.  Otherwise, `compare'
  891.      is valid only if the mode of X is in class `MODE_INT' and Y is a
  892.      `const_int' or `const_double' with mode `VOIDmode'.  The mode of X
  893.      determines what mode the comparison is to be done in; thus it must
  894.      not be `VOIDmode'.
  895.  
  896.      If one of the operands is a constant, it should be placed in the
  897.      second operand and the comparison code adjusted as appropriate.
  898.  
  899.      A `compare' specifying two `VOIDmode' constants is not valid since
  900.      there is no way to know in what mode the comparison is to be
  901.      performed; the comparison must either be folded during the
  902.      compilation or the first operand must be loaded into a register
  903.      while its mode is still known.
  904.  
  905. `(neg:M X)'
  906.      Represents the negation (subtraction from zero) of the value
  907.      represented by X, carried out in mode M.
  908.  
  909. `(mult:M X Y)'
  910.      Represents the signed product of the values represented by X and Y
  911.      carried out in machine mode M.
  912.  
  913.      Some machines support a multiplication that generates a product
  914.      wider than the operands.  Write the pattern for this as
  915.  
  916.           (mult:M (sign_extend:M X) (sign_extend:M Y))
  917.  
  918.      where M is wider than the modes of X and Y, which need not be the
  919.      same.
  920.  
  921.      Write patterns for unsigned widening multiplication similarly using
  922.      `zero_extend'.
  923.  
  924. `(div:M X Y)'
  925.      Represents the quotient in signed division of X by Y, carried out
  926.      in machine mode M.  If M is a floating point mode, it represents
  927.      the exact quotient; otherwise, the integerized quotient.
  928.  
  929.      Some machines have division instructions in which the operands and
  930.      quotient widths are not all the same; you should represent such
  931.      instructions using `truncate' and `sign_extend' as in,
  932.  
  933.           (truncate:M1 (div:M2 X (sign_extend:M2 Y)))
  934.  
  935. `(udiv:M X Y)'
  936.      Like `div' but represents unsigned division.
  937.  
  938. `(mod:M X Y)'
  939. `(umod:M X Y)'
  940.      Like `div' and `udiv' but represent the remainder instead of the
  941.      quotient.
  942.  
  943. `(smin:M X Y)'
  944. `(smax:M X Y)'
  945.      Represents the smaller (for `smin') or larger (for `smax') of X
  946.      and Y, interpreted as signed integers in mode M.
  947.  
  948. `(umin:M X Y)'
  949. `(umax:M X Y)'
  950.      Like `smin' and `smax', but the values are interpreted as unsigned
  951.      integers.
  952.  
  953. `(not:M X)'
  954.      Represents the bitwise complement of the value represented by X,
  955.      carried out in mode M, which must be a fixed-point machine mode.
  956.  
  957. `(and:M X Y)'
  958.      Represents the bitwise logical-and of the values represented by X
  959.      and Y, carried out in machine mode M, which must be a fixed-point
  960.      machine mode.
  961.  
  962. `(ior:M X Y)'
  963.      Represents the bitwise inclusive-or of the values represented by X
  964.      and Y, carried out in machine mode M, which must be a fixed-point
  965.      mode.
  966.  
  967. `(xor:M X Y)'
  968.      Represents the bitwise exclusive-or of the values represented by X
  969.      and Y, carried out in machine mode M, which must be a fixed-point
  970.      mode.
  971.  
  972. `(ashift:M X C)'
  973.      Represents the result of arithmetically shifting X left by C
  974.      places.  X have mode M, a fixed-point machine mode.  C be a
  975.      fixed-point mode or be a constant with mode `VOIDmode'; which mode
  976.      is determined by the mode called for in the machine description
  977.      entry for the left-shift instruction.  For example, on the Vax,
  978.      the mode of C is `QImode' regardless of M.
  979.  
  980. `(lshiftrt:M X C)'
  981. `(ashiftrt:M X C)'
  982.      Like `ashift' but for right shift.  Unlike the case for left shift,
  983.      these two operations are distinct.
  984.  
  985. `(rotate:M X C)'
  986. `(rotatert:M X C)'
  987.      Similar but represent left and right rotate.  If C is a constant,
  988.      use `rotate'.
  989.  
  990. `(abs:M X)'
  991.      Represents the absolute value of X, computed in mode M.
  992.  
  993. `(sqrt:M X)'
  994.      Represents the square root of X, computed in mode M.  Most often M
  995.      will be a floating point mode.
  996.  
  997. `(ffs:M X)'
  998.      Represents one plus the index of the least significant 1-bit in X,
  999.      represented as an integer of mode M.  (The value is zero if X is
  1000.      zero.)  The mode of X need not be M; depending on the target
  1001.      machine, various mode combinations may be valid.
  1002.  
  1003. 
  1004. File: gcc.info,  Node: Comparisons,  Next: Bit Fields,  Prev: Arithmetic,  Up: RTL
  1005.  
  1006. Comparison Operations
  1007. =====================
  1008.  
  1009.    Comparison operators test a relation on two operands and are
  1010. considered to represent a machine-dependent nonzero value described by,
  1011. but not necessarily equal to, `STORE_FLAG_VALUE' (*note Misc::.)  if
  1012. the relation holds, or zero if it does not.  The mode of the comparison
  1013. operation is independent of the mode of the data being compared.  If
  1014. the comparison operation is being tested (e.g., the first operand of an
  1015. `if_then_else'), the mode must be `VOIDmode'.  If the comparison
  1016. operation is producing data to be stored in some variable, the mode
  1017. must be in class `MODE_INT'.  All comparison operations producing data
  1018. must use the same mode, which is machine-specific.
  1019.  
  1020.    There are two ways that comparison operations may be used.  The
  1021. comparison operators may be used to compare the condition codes `(cc0)'
  1022. against zero, as in `(eq (cc0) (const_int 0))'.  Such a construct
  1023. actually refers to the result of the preceding instruction in which the
  1024. condition codes were set.  The instructing setting the condition code
  1025. must be adjacent to the instruction using the condition code; only
  1026. `note' insns may separate them.
  1027.  
  1028.    Alternatively, a comparison operation may directly compare two data
  1029. objects.  The mode of the comparison is determined by the operands; they
  1030. must both be valid for a common machine mode.  A comparison with both
  1031. operands constant would be invalid as the machine mode could not be
  1032. deduced from it, but such a comparison should never exist in RTL due to
  1033. constant folding.
  1034.  
  1035.    In the example above, if `(cc0)' were last set to `(compare X Y)',
  1036. the comparison operation is identical to `(eq X Y)'.  Usually only one
  1037. style of comparisons is supported on a particular machine, but the
  1038. combine pass will try to merge the operations to produce the `eq' shown
  1039. in case it exists in the context of the particular insn involved.
  1040.  
  1041.    Inequality comparisons come in two flavors, signed and unsigned.
  1042. Thus, there are distinct expression codes `gt' and `gtu' for signed and
  1043. unsigned greater-than.  These can produce different results for the same
  1044. pair of integer values: for example, 1 is signed greater-than -1 but not
  1045. unsigned greater-than, because -1 when regarded as unsigned is actually
  1046. `0xffffffff' which is greater than 1.
  1047.  
  1048.    The signed comparisons are also used for floating point values.
  1049. Floating point comparisons are distinguished by the machine modes of
  1050. the operands.
  1051.  
  1052. `(eq:M X Y)'
  1053.      1 if the values represented by X and Y are equal, otherwise 0.
  1054.  
  1055. `(ne:M X Y)'
  1056.      1 if the values represented by X and Y are not equal, otherwise 0.
  1057.  
  1058. `(gt:M X Y)'
  1059.      1 if the X is greater than Y.  If they are fixed-point, the
  1060.      comparison is done in a signed sense.
  1061.  
  1062. `(gtu:M X Y)'
  1063.      Like `gt' but does unsigned comparison, on fixed-point numbers
  1064.      only.
  1065.  
  1066. `(lt:M X Y)'
  1067. `(ltu:M X Y)'
  1068.      Like `gt' and `gtu' but test for "less than".
  1069.  
  1070. `(ge:M X Y)'
  1071. `(geu:M X Y)'
  1072.      Like `gt' and `gtu' but test for "greater than or equal".
  1073.  
  1074. `(le:M X Y)'
  1075. `(leu:M X Y)'
  1076.      Like `gt' and `gtu' but test for "less than or equal".
  1077.  
  1078. `(if_then_else COND THEN ELSE)'
  1079.      This is not a comparison operation but is listed here because it is
  1080.      always used in conjunction with a comparison operation.  To be
  1081.      precise, COND is a comparison expression.  This expression
  1082.      represents a choice, according to COND, between the value
  1083.      represented by THEN and the one represented by ELSE.
  1084.  
  1085.      On most machines, `if_then_else' expressions are valid only to
  1086.      express conditional jumps.
  1087.  
  1088. `(cond [TEST1 VALUE1 TEST2 VALUE2 ...] DEFAULT)'
  1089.      Similar to `if_then_else', but more general.  Each of TEST1,
  1090.      TEST2, ... is performed in turn.  The result of this expression is
  1091.      the VALUE corresponding to the first non-zero test, or DEFAULT if
  1092.      none of the tests are non-zero expressions.
  1093.  
  1094.      This is currently not valid for instruction patterns and is
  1095.      supported only for insn attributes.  *Note Insn Attributes::.
  1096.  
  1097. 
  1098. File: gcc.info,  Node: Bit Fields,  Next: Conversions,  Prev: Comparisons,  Up: RTL
  1099.  
  1100. Bit Fields
  1101. ==========
  1102.  
  1103.    Special expression codes exist to represent bitfield instructions.
  1104. These types of expressions are lvalues in RTL; they may appear on the
  1105. left side of an assignment, indicating insertion of a value into the
  1106. specified bit field.
  1107.  
  1108. `(sign_extract:M LOC SIZE POS)'
  1109.      This represents a reference to a sign-extended bit field contained
  1110.      or starting in LOC (a memory or register reference).  The bit field
  1111.      is SIZE bits wide and starts at bit POS.  The compilation option
  1112.      `BITS_BIG_ENDIAN' says which end of the memory unit POS counts
  1113.      from.
  1114.  
  1115.      If LOC is in memory, its mode must be a single-byte integer mode.
  1116.      If LOC is in a register, the mode to use is specified by the
  1117.      operand of the `insv' or `extv' pattern (*note Standard Names::.)
  1118.      and is usually a full-word integer mode, which is the default if
  1119.      none is specified.
  1120.  
  1121.      The mode of POS is machine-specific and is also specified in the
  1122.      `insv' or `extv' pattern.
  1123.  
  1124.      The mode M is the same as the mode that would be used for LOC if
  1125.      it were a register.
  1126.  
  1127. `(zero_extract:M LOC SIZE POS)'
  1128.      Like `sign_extract' but refers to an unsigned or zero-extended bit
  1129.      field.  The same sequence of bits are extracted, but they are
  1130.      filled to an entire word with zeros instead of by sign-extension.
  1131.  
  1132. 
  1133. File: gcc.info,  Node: Conversions,  Next: RTL Declarations,  Prev: Bit Fields,  Up: RTL
  1134.  
  1135. Conversions
  1136. ===========
  1137.  
  1138.    All conversions between machine modes must be represented by
  1139. explicit conversion operations.  For example, an expression which is
  1140. the sum of a byte and a full word cannot be written as `(plus:SI
  1141. (reg:QI 34) (reg:SI 80))' because the `plus' operation requires two
  1142. operands of the same machine mode.  Therefore, the byte-sized operand
  1143. is enclosed in a conversion operation, as in
  1144.  
  1145.      (plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
  1146.  
  1147.    The conversion operation is not a mere placeholder, because there
  1148. may be more than one way of converting from a given starting mode to
  1149. the desired final mode.  The conversion operation code says how to do
  1150. it.
  1151.  
  1152.    For all conversion operations, X must not be `VOIDmode' because the
  1153. mode in which to do the conversion would not be known.  The conversion
  1154. must either be done at compile-time or X must be placed into a register.
  1155.  
  1156. `(sign_extend:M X)'
  1157.      Represents the result of sign-extending the value X to machine
  1158.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  1159.      a mode narrower than M.
  1160.  
  1161. `(zero_extend:M X)'
  1162.      Represents the result of zero-extending the value X to machine
  1163.      mode M.  M must be a fixed-point mode and X a fixed-point value of
  1164.      a mode narrower than M.
  1165.  
  1166. `(float_extend:M X)'
  1167.      Represents the result of extending the value X to machine mode M.
  1168.      M must be a floating point mode and X a floating point value of a
  1169.      mode narrower than M.
  1170.  
  1171. `(truncate:M X)'
  1172.      Represents the result of truncating the value X to machine mode M.
  1173.      M must be a fixed-point mode and X a fixed-point value of a mode
  1174.      wider than M.
  1175.  
  1176. `(float_truncate:M X)'
  1177.      Represents the result of truncating the value X to machine mode M.
  1178.      M must be a floating point mode and X a floating point value of a
  1179.      mode wider than M.
  1180.  
  1181. `(float:M X)'
  1182.      Represents the result of converting fixed point value X, regarded
  1183.      as signed, to floating point mode M.
  1184.  
  1185. `(unsigned_float:M X)'
  1186.      Represents the result of converting fixed point value X, regarded
  1187.      as unsigned, to floating point mode M.
  1188.  
  1189. `(fix:M X)'
  1190.      When M is a fixed point mode, represents the result of converting
  1191.      floating point value X to mode M, regarded as signed.  How
  1192.      rounding is done is not specified, so this operation may be used
  1193.      validly in compiling C code only for integer-valued operands.
  1194.  
  1195. `(unsigned_fix:M X)'
  1196.      Represents the result of converting floating point value X to
  1197.      fixed point mode M, regarded as unsigned.  How rounding is done is
  1198.      not specified.
  1199.  
  1200. `(fix:M X)'
  1201.      When M is a floating point mode, represents the result of
  1202.      converting floating point value X (valid for mode M) to an
  1203.      integer, still represented in floating point mode M, by rounding
  1204.      towards zero.
  1205.  
  1206.